package com.hue.schedulertask;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/*
    定时任务
 */
@Component
public class SchedulerTask {
    @Scheduled(cron="*/6 * * * * ?")
    public void task1(){
        System.out.println("task1...");
    }

    @Scheduled(fixedRate = 6000)
    public void task2() {
        System.out.println("task2...");
    }
}
